import { MergeConfigType, MergeConfigItem } from '@/components/FormPro/props';
import { getEditOrDetailConfig } from '@/components/FormPro/util';

export const getFormFileds = (type: MergeConfigType) => {
  const formBaseList: MergeConfigItem[] = [
    {
      label: '备注',
      filed: 'reason',
      props: {
        col: {
          span: 24,
        },
      },
      edit: {
        props: {
          component: {
            placeholder: '请填写 备注',
          },
          formItem: {
            rules: [
              { required: true, trigger: 'change', message: '请填写 备注' },
            ],
          },
        },
        component: 'a-input',
      },
    },
  ];

  return getEditOrDetailConfig(formBaseList, type);
};
